package lab02.Test37;

/**
 * Created by Administrator on 2017/11/18.
 */
public class StudentDemo {
    public static void main(String[] args) {

    Student[] students=new Student[4];
    students[0]=new Graduate();
    students[0].name="张三";
    students[0].type="研究生";
    students[0].scores[0]=92.8;
    students[0].scores[1]=89.8;
    students[0].scores[2]=96.5;

    students[1]=new Graduate();
    students[1].name="李四";
    students[1].type="研究生";
    students[1].scores[0]=78;
    students[1].scores[1]=88;
    students[1].scores[2]=69;

    students[2]=new Undergraduate();
    students[2].name="旺旺";
    students[2].type="本科生";
    students[2].scores[0]=56;
    students[2].scores[1]=88;
    students[2].scores[2]=53.5;


    students[3]=new Undergraduate();
    students[3].name="李华";
    students[3].type="本科生";
    students[3].scores[0]=69;
    students[3].scores[1]=98;
    students[3].scores[2]=89;

    for (int i=0;i<students.length;i++){

        System.out.println(students[i].name+" "+students[i].type+" "+students[i].calResult());
    }
}
}
